package cn.yanjr.common.dao;

import java.util.List;
import java.util.Map;

public interface BaseDao<K, T> {
	
	public int update(String sql, Object... params);
	
	public int[] batchUpdate(String sql, Object[]...params);
	
	public List<Map<String, Object>> find(String sql, Object... params);
	
	public List<T> findEntitys(String sql, Object...params);
	
	public T findFirstEntity(String sql, Object...params);
	
	public Map<String, Object> findFirst(String sql, Object...params);
	
	public Object findBy(String sql, String columnName, Object...params);
	
	public Object findBy(String sql, int columnIndex, Object...params);
	
	public Map<String, Object> findEntityPage(String sql, int page, int limit, Object...params);
	
	public Map<String, Object> findPage(String sql, int page, int limit, Object...params);

	public int count(String sql, Object...params);
}
